package com.zyong.design.pattern.interpret.case1;

/**
 * 终结表达式-数值表达式
 * @program: zyong-design-pattern
 * @ClassName: NumberExpression
 * @author: zyong
 * @create: 2024-06-01 20:35
 */
public class NumberExpression implements IExpression {
    private int value;

    public NumberExpression(String value) {
        this.value = Integer.valueOf(value);
    }

    @Override
    public int interpret() {
        return this.value;
    }
}
